<template>
	<view :style="[{'font-weight':Style,'font-family':Font}]">
		<cu-custom bgColor="bg-gradual-blue" isBack="true">
			<view slot="backText">返回</view>
			<view slot="content">实时管理</view>
		</cu-custom>
		<scroll-dome :list="list" @jumpArchives="jumpArchives" @zylongtap="zylongtap"></scroll-dome>
		<chunLei-popups v-model="value1" :popData="data1" @tapPopup="tapPopup" @zyinput="zyinput" :x="x" :y="y" placement="top-end"></chunLei-popups>
	</view>
</template>

<script>
	import chunLeiPopups from "@/colorui/components/chunLei-popups/chunLei-popups"
	import ScrollDome from '@/colorui/components/ScrollDome'
	import {
		mapGetters
	} from 'vuex'
	import {
		Commonly,
	} from "@/mixin/mixin.js"
	export default {
		mixins: [Commonly],
		data() {
			return {
				list: [{
						name: '络简工序',
						LMENUID: '970607',
						isShow: false,
						Children: [{
							img: "/static/images/timedata.png",
							name: '络简实时数据',
							isShow: true,
							url: "./quality/timedataRoving/timedataRoving",
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '络简生产分析报表',
							url: "./quality/timedataCarding/timedataCarding01",
							LFUNCNO: '9562',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '络简开停车记录',
							url: "./quality/timedataCarding/timedataCarding02",
							LFUNCNO: '9564',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							url: "./quality/timedataCarding/timedataCarding03",
							name: '络简故障记录',
							LFUNCNO: '9563',
							isShow: false,
						}],
						id: 0
					}, {
						name: '梳棉工序',
						LMENUID: '970608',
						isShow: false,
						Children: [{
							img: "/static/images/timedata.png",
							name: '梳棉实时数据',
							url: "./quality/formCarding/formCarding",
							isShow: true,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '梳棉生产分析报表',
							url: "./quality/timedataWinding/timedataWinding01",
							LFUNCNO: '9565',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '梳棉开停车记录',
							url: "./quality/timedataWinding/timedataWinding02",
							LFUNCNO: '9568',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '梳棉故障记录',
							url: "./quality/timedataWinding/timedataWinding03",
							LFUNCNO: '9566',
							isShow: false,
						}],
						id: 1
					}, {
						name: '并条工序',
						LMENUID: '970609',
						isShow: false,
						Children: [{
							img: "/static/images/timedata.png",
							name: '并条实时数据',
							url: "./quality/timedataDarwing/timedataDarwing",
							isShow: true,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '并条生产分析报表',
							url: "./quality/timedataDarwing/timedataDarwing01",
							LFUNCNO: '9570',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '并条开停车记录',
							url: "./quality/timedataDarwing/timedataDarwing02",
							LFUNCNO: '9572',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '并条故障记录',
							url: "./quality/timedataDarwing/timedataDarwing03",
							LFUNCNO: '9571',
							isShow: false,
						}],
						id: 2
					}, {
						name: '粗纱工序',
						LMENUID: '970604',
						isShow: false,
						Children: [{
							img: "/static/images/timedata.png",
							name: '粗纱实时数据',
							isShow: true,
							url: "./quality/timedataRoving/timedataRoving",
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '粗纱落纱分析报表',
							url: "./quality/timedataRoving/RovingTable01",
							LFUNCNO: '9577',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '粗纱断纱断头分析报表',
							url: "./quality/timedataRoving/RovingTable02",
							LFUNCNO: '9575',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '粗纱开停车记录',
							url: "./quality/timedataRoving/RovingTable03",
							LFUNCNO: '9576',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '粗纱故障记录',
							url: "./quality/timedataRoving/RovingTable04",
							LFUNCNO: '9574',
							isShow: false,
						}],
						id: 3
					},
					{
						name: '细纱工序',
						LMENUID: '970605',
						isShow: false,
						Children: [{
							img: "/static/images/timedata.png",
							name: '细纱实时数据',
							isShow: true,
							url: "./quality/timedataFing/timedataFing",
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '细纱生产分析报表',
							url: "./quality/timedataFing/FingTable01",
							LFUNCNO: '9581',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '细纱开停车记录',
							url: "./quality/timedataFing/FingTable02",
							LFUNCNO: '9579',
							isShow: false,
						}, {
							img: "/static/images/Statisticalreportforms.png",
							name: '细纱故障记录',
							url: "./quality/timedataFing/FingTable03",
							LFUNCNO: '9580',
							isShow: false,
						}],
						id: 4
					},
					// {
					// 	name: '倍捻工序',
					// 	Children: [{
					// 			img: "/static/images/timedata.png",
					// 			name: '实时数据',
					// 		},{
					// 		img: "/static/images/Statisticalreportforms.png",
					// 		name: '统计报表',
					// 	}],
					// 	id: 3
					// },
				],
			}
		},
		computed: {
			...mapGetters([
				'Style',
				'Font',
			])
		},
		components: {
			ScrollDome,
			chunLeiPopups
		},
		onLoad() {
			let tree = uni.getStorageSync('tree')
			for (let value of tree) {
				if (value.LPARENTID == '00') {
					for (let qq of value.children) {
						if (qq.LMENUID == '9706') {
							for (let hh of qq.children) {
								for (let ww of this.list) {
									if (hh.LMENUID == ww.LMENUID) {
										ww.isShow = true
										for (let qqq of ww.Children) {
											for (let sss of hh.children) {
												if (qqq.LFUNCNO == sss.LFUNCNO) {
													qqq.isShow = true
												}
											}

										}
									}
								}
							}
						}
					}
				}
			}
		},
		methods: {
			jumpArchives(item) {
				if (item.index === 0) {
					if (item.infoindex === 0) {
						uni.navigateTo({
							url: './timedataWinding/timedataWinding'
						})
					} else if (item.infoindex === 1) {
						uni.navigateTo({
							url: './timedataCarding/timedataCarding01'
						})
					} else if (item.infoindex === 2) {
						uni.navigateTo({
							url: './timedataCarding/timedataCarding02'
						})
					} else if (item.infoindex === 3) {
						uni.navigateTo({
							url: './timedataCarding/timedataCarding03'
						})
					}
				} else if (item.index === 1) {
					if (item.infoindex === 0) {
						uni.navigateTo({
							url: './timedataCarding/timedataCarding'
						})
					} else if (item.infoindex === 1) {
						uni.navigateTo({
							url: './timedataWinding/timedataWinding01'
						})
					} else if (item.infoindex === 2) {
						uni.navigateTo({
							url: './timedataWinding/timedataWinding02'
						})
					} else if (item.infoindex === 3) {
						uni.navigateTo({
							url: './timedataWinding/timedataWinding03'
						})
					}
				} else if (item.index === 2) {
					if (item.infoindex === 0) {
						uni.navigateTo({
							url: './timedataDarwing/timedataDarwing'
						})
					} else if (item.infoindex === 1) {
						uni.navigateTo({
							url: './timedataDarwing/timedataDarwing01'
						})
					} else if (item.infoindex === 2) {
						uni.navigateTo({
							url: './timedataDarwing/timedataDarwing02'
						})
					} else if (item.infoindex === 3) {
						uni.navigateTo({
							url: './timedataDarwing/timedataDarwing03'
						})
					}
				} else if (item.index === 3) {
					if (item.infoindex === 0) {
						uni.navigateTo({
							url: './timedataRoving/timedataRoving'
						})
					} else if (item.infoindex === 1) {
						uni.navigateTo({
							url: './timedataRoving/RovingTable01'
						})
					} else if (item.infoindex === 2) {
						uni.navigateTo({
							url: './timedataRoving/RovingTable02'
						})
					} else if (item.infoindex === 3) {
						uni.navigateTo({
							url: './timedataRoving/RovingTable03'
						})
					} else {
						uni.navigateTo({
							url: './timedataRoving/RovingTable04'
						})
					}
				} else if (item.index === 4) {
					if (item.infoindex === 0) {
						uni.navigateTo({
							url: './timedataFing/timedataFing'
						})
					} else if (item.infoindex === 1) {
						uni.navigateTo({
							url: './timedataFing/FingTable01'
						})
					} else if (item.infoindex === 2) {
						uni.navigateTo({
							url: './timedataFing/FingTable02'
						})
					} else {
						uni.navigateTo({
							url: './timedataFing/FingTable03'
						})
					}
				}
			}
		}
	}
</script>

<style lang="scss">
</style>
